package com.hospital.workstation.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hospital.common.core.domain.PageQuery;
import com.hospital.workstation.domain.PatientBaseInfo;
import com.hospital.workstation.domain.vo.PatientBaseInfoVo;
import com.hospital.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 患者基本信息Mapper接口
 *
 * @author whb
 * @date 2023-02-08
 */
public interface PatientBaseInfoMapper extends BaseMapperPlus<PatientBaseInfoMapper, PatientBaseInfo, PatientBaseInfoVo> {
    /**
     * 查询患者基本信息
     *
     * @param build
     * @param lqw
     * @return
     */
    Page<PatientBaseInfoVo> customPageList(@Param("page") Page<PatientBaseInfoVo> build, @Param(Constants.WRAPPER) Wrapper<PatientBaseInfo> lqw);

    /**
     * 查询用户角色权限字符
     *
     * @param userId 用户id
     * @return
     */
    List<String> selectRoleKeyList(Long userId);

    /**
     * 查询统计管理-我的药历
     *
     * @param build
     * @param buildQueryWrapper
     * @return
     */
    Page<PatientBaseInfoVo> queryMyMedicationPageList(@Param("page") Page<PatientBaseInfoVo> build, @Param(Constants.WRAPPER) Wrapper<PatientBaseInfo> buildQueryWrapper);

    /**
     * 查询患者病症信息列表
     *
     * @param build
     * @param buildQueryWrapper
     * @return
     */
    Page<PatientBaseInfoVo> getPatientBaseInfoListOfTcm(@Param("page") Page<PatientBaseInfoVo> build, @Param(Constants.WRAPPER) Wrapper<PatientBaseInfo> buildQueryWrapper);
}
